from django.db import models

# Create your models here.
from django.db import models

from utils.models import BaseModel
from orders.models import OrderInfo

# Create your models here.


class Payment(BaseModel):
    """
    支付信息

    我们除了要保存支付宝的交易流水号之外,还需要保存交易流水号所对应的订单信息

    """
    order = models.ForeignKey(OrderInfo, on_delete=models.CASCADE, verbose_name='订单')
    trade_id = models.CharField(max_length=100, unique=True, null=True, blank=True, verbose_name="支付编号")

    class Meta:
        db_table = 'tb_payment'